import React, { Component } from 'react';
import { observer, inject } from "mobx-react";
import { Spin } from 'antd';
import './Loading.less'

@inject('rootStore') @observer
class PageLoading extends Component {
  render() {
    const globalStore = this.props.rootStore.globalStore;
    return (
      <div
        className="page-loading"
        style={globalStore.showLoading ? {} : {visibility: 'hidden'}}>
        <Spin size="large" />
      </div>
    )
  }
}

export default PageLoading;
